import { getCurrentInstance, defineComponent, ComponentInternalInstance } from "vue";
import "./index.scss";
import RecordList from "./record";
import StatusList from "./status";
export default defineComponent({
	emits: [],
	setup() {
		const { proxy } = getCurrentInstance() as ComponentInternalInstance;
		const state = reactive({
			viewType: "status"
		});
		return () => {
			return (
				<div class="page-alarm-list">
					<el-tabs v-model={state.viewType}>
						<el-tab-pane label={proxy?.$t("serviceauth.tab_label.status")} name="status">
							{state.viewType == "status" ? <StatusList class="bg-white" /> : null}
						</el-tab-pane>
						<el-tab-pane label={proxy?.$t("serviceauth.tab_label.record")} name="record">
							{state.viewType == "record" ? <RecordList /> : null}
						</el-tab-pane>
					</el-tabs>
				</div>
			);
		};
	}
});
